package com.jiangnan.warehouse_management.dto.response;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import java.sql.Timestamp;

@Data
public class OutboundRecordResponse {
    private Integer outboundId;
    private Integer itemId;
    private ItemDTO item;
    private Integer warehouseId;
    private WarehouseDTO warehouse;
    private Integer quantity;
    private Double unitPrice;
    private Double totalAmount;
    private String recipient;
    private Integer operatorId;
    private OperatorDTO operator;
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "Asia/Shanghai")
    private Timestamp outboundTime;
    private String notes;
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "Asia/Shanghai")
    private Timestamp createdAt;

    @Data
    public static class ItemDTO {
        private Integer itemId;
        private String itemName;
    }

    @Data
    public static class WarehouseDTO {
        private Integer warehouseId;
        private String warehouseName;
    }

    @Data
    public static class OperatorDTO {
        private Integer userId;
        private String username;
        private String realName;
    }
}